package com.bgs.service.impl;

import com.bgs.common.R;
import com.bgs.pojo.Picture;
import com.bgs.mapper.PictureMapper;
import com.bgs.service.PictureService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 图片表 服务实现类
 * </p>
 *
 * @author Asia
 * @since 2021-09-14
 */
@Service
public class PictureServiceImpl extends ServiceImpl<PictureMapper, Picture> implements PictureService {

    @Resource
    private PictureMapper pictureMapper;

    /**
     * 查询商品对应的图片
     * @param id
     * @return
     */
    @Override
    public R fourQueryImg(int id) {
        List<Picture> list = pictureMapper.fourQueryImg(id);
        return R.ok().data("data",list);
    }
}
